package com.itheima.manager_system.domain;

public class Student extends Person {

    private int chinese;
    private int math;
    private int english;

    public Student() {
    }

    public Student(int chinese, int math, int english) {
        this.chinese = chinese;
        this.math = math;
        this.english = english;
    }

    public Student(int id, String name, int age, String adress,String job, int chinese, int math, int english) {
        super(id, name, age, adress,job);
        this.chinese = chinese;
        this.math = math;
        this.english = english;
    }

    public Student(int id, String name, int age, String adress,String job) {
        super(id, name, age, adress,job);
    }

    public int getChinese() {
        return chinese;
    }

    public void setChinese(int chinese) {
        this.chinese = chinese;
    }

    public int getMath() {
        return math;
    }

    public void setMath(int math) {
        this.math = math;
    }

    public int getEnglish() {
        return english;
    }

    public void setEnglish(int english) {
        this.english = english;
    }
    public int SumScore(){
        return getChinese()+getEnglish()+getMath();
    }

    @Override
    public String toString() {
        return "Student{" +
                "chinese=" + chinese +
                ", math=" + math +
                ", english=" + english +
                '}';
    }
}
